package com.loopy.tomcat.servlet;

import com.loopy.tomcat.http.loopyRequest;
import com.loopy.tomcat.http.loopyResponse;

import java.io.IOException;

public abstract class loopyhttpSevlet implements loopyServlet{
    @Override
    public void service(loopyRequest request, loopyResponse response) throws IOException {
        if ("GET".equalsIgnoreCase(request.getMethod())){
            doGet(request,response);
        } else if ("POST".equalsIgnoreCase(request.getMethod())) {
            doPost(request,response);
        }
    }
    public abstract void doGet(loopyRequest request, loopyResponse response);
    public abstract void doPost(loopyRequest request, loopyResponse response);
}
